<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019-08-02
 * Time: 14:28
 */

namespace App\Http\Controllers\Api\Member;

use App\Http\Controllers\Api\BaseAdminController;
use App\Http\Requests\User\UserLoginLogPageRequest;
use App\Services\UserLoginLogService;
use App\Http\Transformers\User\UserLoginLogPageTransformer;

/**
 * Class UserLoginLogController
 * @package App\Http\Controllers\Api
 */
class UserLoginLogController extends BaseAdminController
{
    /**
     * @var UserLoginLogService
     */
    protected $user_loginLog_service;

    /**
     * UserLoginLogController constructor.
     * @param UserLoginLogService $userLoginLogService
     */
    public function __construct(UserLoginLogService $userLoginLogService){
        $this->user_loginLog_service = $userLoginLogService;
    }

    /**
     * 获取用户登录列表
     */
    public function userLoginLogPage(UserLoginLogPageRequest $request){
        $data = $this->user_loginLog_service->getUserLoginLogPage($request->all());

        return $this->response->paginator($data, new UserLoginLogPageTransformer());
    }
}
